﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PsychveyApp1.classes;
using System.Collections;

namespace PsychveyApp1
{
    public partial class UserHomePremium : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            lblUsernamePremium.Text = (string)(Session["username"]);
        }

        protected void ddlUserPremium_SelectedIndexChanged(object sender, EventArgs e)
        {


        }

        protected void btnProceedPremium_Click(object sender, EventArgs e)
        {
            if (ddlUserPremium.SelectedIndex == 1)
            {

                UserAccount user = new UserAccount();
                string accountTypeSelected = user.accountTypeSelected;
                string expirationDateForPremium = user.expirationDateForPremium;
                string username = user.username;
                string password = user.password;
                string userFullName = user.userFullName;
                string email = user.email;

                UserAccount currentUser = (UserAccount)(Session["currentUser"]);
                 
                string querystring = "accounttypeselected=" + accountTypeSelected;
                querystring += "&" + "expirationdateforpremium=" + expirationDateForPremium;
                querystring += "&"+ "username=" + username;
                querystring += "&" + "password=" + password;
                querystring += "&" + "userfullname=" + userFullName;
                querystring += "&" + "email=" + email; 
                

                Server.Transfer("UserAccountHome.aspx?" + querystring); 
            }
            else if (ddlUserPremium.SelectedIndex == 2)
            {
                Response.Redirect("Home.aspx");
            }
       
        }
    }
}